/********************************************************************************
 *      Copyright:  (C) 2024 linuxer<linuxer@email.com>
 *                  All rights reserved.
 *
 *       Filename:  database.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(15/03/24)
 *         Author:  linuxer <linuxer@email.com>
 *      ChangeLog:  1, Release initial version on "15/03/24 20:06:34"
 *                 
 ********************************************************************************/
#include<sqlite3.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include "logger.h"
static int callback(void *NotUsed, int argc, char **argv, char **azColName);

//创建数据库
void  create_db(sqlite3* db,char *db_name);

//创建表

void create_db_table(sqlite3* db,char *db_name,char *table_name);
//增加记录

void tb_add(sqlite3* db,char *db_name,char *table_name,char *serial,char* temperature,char *time);

//删除记录
void tb_delete(sqlite3 *db,char *db_name,char *table_name,char *time);

//查询记录

void tb_select(sqlite3* db,char *db_name,char *table_name);


